package com.design.builder;

/**
 * @Author: ChengLei.Liu
 * @Date: 2020-06-10 09:58
 * @Description: 建造者模式
 */
public class BuilderDemo {

    public static void main(String[] args) {
        Director director = new Director(new BigCarBuilder());
        Car bigCar = director.buildCar();
        System.out.println(bigCar);
        director.setAbstractCarBuilder(new SmallCarBuilder());
        Car smallCar = director.buildCar();
        System.out.println(smallCar);
    }
}
